from pydantic import (
    BaseModel,
    Field,
)

from utils.validator_utils.pydantic_x.errors import PydanticCustomErrorBase


class ObjectIdError(PydanticCustomErrorBase):
    code = "invalid_object_id"
    msg_template = "invalid ObjectId <{object_id}>"
    msg_template_zh_cn = "无效的 ObjectId <{object_id}>"


class Model1(BaseModel):
    name: str = Field(..., title="姓名", min_length=3, max_length=10)
